import request from '@/utils/request'

// 查询现金日记账列表
export function listJournal(query) {
  return request({
    url: '/journal/journal/list',
    method: 'get',
    params: query
  })
}

// 查询现金日记账详细
export function getJournal(id) {
  return request({
    url: '/journal/journal/' + id,
    method: 'get'
  })
}

// 新增现金日记账
export function addJournal(data) {
  return request({
    url: '/journal/journal',
    method: 'post',
    data: data
  })
}

// 修改现金日记账
export function updateJournal(data) {
  return request({
    url: '/journal/journal',
    method: 'put',
    data: data
  })
}

// 删除现金日记账
export function delJournal(id) {
  return request({
    url: '/journal/journal/' + id,
    method: 'delete'
  })
}

// 查询用户
export function listAcount() {
  return request({
    url: '/journal/journal/listAcount' ,
    method: 'post'
  })
}
// 查询收支列表
export function listCategories() {
  return request({
    url: '/journal/journal/listCategories' ,
    method: 'post'
  })
}